<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<head>
<%
     String path=request.getContextPath();
      String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="<%=basePath%>layui/css/layui.css" media="all"/>
<script src="<%=basePath%>layui/layui.js"></script>
 <link rel="stylesheet" href="<%=basePath%>frame/layui/css/layui.css">
    <link rel="stylesheet" href="<%=basePath%>frame/static/css/style.css">
    <link rel="icon" href="<%=basePath%>frame/static/image/code.png">
</head>
<body>
<ul class="layui-nav layui-bg-green" lay-filter="">
<li class="layui-nav-item">
<div class="logo">
				<h1><a href="welcome.jsp">Cloud renting</a></h1>
</div>
</li>			
  <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/homeinfo/query">租房</a></li>
  <c:if test="${user1.username==null}">
  <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/user/home1">登录</a></li>
  </c:if>
  <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/user/home2">注册</a></li>
  <c:if test="${user1.username==null}">
  <li class="layui-nav-item">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;欢迎来到云租房,请登录</li>
  </c:if>
  <li class="layui-nav-item">
  <a href="javascript:;">关于我们</a>
    <dl class="layui-nav-child"> <!-- 二级菜单 -->
      <dd><a href="">移动模块</a></dd>
      <dd><a href="">后台模版</a></dd>
      <dd><a href="">电商平台</a></dd>
    </dl>
  </li>
  <c:if test="${user1.username!=null}">
  <li class="layui-nav-item"><img style="width: 50px;height: 50px; border-radius:100%; overflow:hidden;" alt="" src="/img/${user1.headimg}" >  </li>
  </c:if>
  <li class="layui-nav-item"><a> ${user1.username}${type}</a></li>
  <c:if test="${user1.username!=null}">
<li class="layui-nav-item"><a href="${pageContext.request.contextPath}/user/logout1">退出 </a></li>
  </c:if>
  <div style="position: absolute;right: 0px;top: 0px">
  <li class="layui-nav-item">
  <span id="cg">2018/12/21 上午12:00:00</span></li>
  <li class="layui-nav-item">
  <div class="weather">
    <iframe width="455" scrolling="no" height="75" frameborder="0" allowtransparency="true" 
    src="http://i.tianqi.com/index.php?c=code&amp;id=38&amp;icon=1&amp;num=2&amp;align=left">
    </iframe>
  </div>
  </li>
  </div>
</ul>

<div class="layui-carousel" id="test1">
  <div carousel-item>
    <div><img src="/img/d1.jpg"></div>
    <div><img src="/img/d2.jpg"></div>
    <div><img src="/img/d3.jpg"></div>
    <div><img src="/img/d4.jpg"></div>
  </div>
</div>
<script type="text/javascript">
setInterval("cg.innerHTML=new Date().toLocaleString()",1000);
layui.use(['carousel','element','laydate'], function(){
	  var carousel = layui.carousel;
	  var element = layui.element;
	  var laydate = layui.laydate;
	  //建造实例
	  carousel.render({
	    elem: '#test1'
	    ,width: '100%' //设置容器宽度
	    ,height:'716px'
	    ,arrow: 'always' //始终显示箭头
	    ,anim: 'default' //切换动画方式
	    ,interval:'2000'
	  });
	})
</script>
</body>
</html>